This invention relates to a printing device for controlling printing, by setting each column width based on the respective word data to be printed, the word data in the corresponding column on a recording paper to form a tabulation.
When a variety of data is totalized using an electronic computer etc., a number of data corresponding to the content of data to be totalized are stored in a memory device. If, for example, the results of transactions at the associated business offices are totalized monthly, a group of data based on each month can be obtained. The group of data is, after stored in the memory device, read out of the memory device and printed in each column on a recording paper as, for example, shown in FIG. 1. For example, the group of data monthly obtained from the associated business offices constitutes a unit record data corresponding to one line, and the groups of data so monthly obtained are sequentially stored in a series configuration in the memory device. The unit record data is so stored in the memory device that a key word representative of a month is followed, in a predetermined order, by word data respectively consisting of numerical values and corresponding to the results of transactions at the associated business offices such as TOKYO, OSAKA, NAGOYA . . . . business offices with the respective two adjacent word data divided by a word positioning code "BK" and the respective two adjacent unit record data divided by a unit record positioning code "BE".
The data stored in the memory device are suitably printed in each column on a recording paper. It is, however, necessary to effect printing after a tabulation as shown in FIG. 1 has been prepared beforehand according to the width of each word data read out of the memory device. In the preparation of the tabulation, therefore, the column width must be preliminarily selected according to the width of numerical data from the respective business offices and a tab-set be made according to the selected column width. Where the number of columns per line (i.e. the number of word data constituting one unit record data), as well as the number of characters in each word data, is predetermined, the width of a recording paper can be determined dependent upon the number of columns and the tab-set is effected accordingly. Where, however, the number of characters in each word data and the number of columns per line are not predetermined, it is impossible to preliminarily set the column width of the recording paper.
Suppose that the column width is predetermined irrespective of the length of word data to be printed. If, in this case, the number of characters in a certain word data exceeds the printable column width, printing can not be effected. The same result occurs if all the record data included in one unit record data are not accommodated within a capacity provided by all the preset column widths per line.
This invention is directed to the solution of the abovementioned drawbacks and, accordingly, the object of this invention is to provide a printing device which, after each column width is automatically set according to the number of digits in respective word data to be printed, can print the word data in the corresponding column on the recording paper to form a tabulation.